# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin
from movie.models import Comment, Stamp, Movie, Review


class MovieAdmin(admin.ModelAdmin):
	# 可编辑区
	fieldsets = (
		['main_name', {
			'fields': ['title']
		}],
		['casts_name', {
			'fields': ['casts'],
		}],
		['summary', {
			'fields': ['summary'],
		}]
	)
	list_per_page = 40
	list_display = ['title', 'directors', 'year', 'rating']
	search_fields = ['title']
	list_filter = ['year', 'countries', 'rating']


class CommentAdmin(admin.ModelAdmin):
	list_display = ['user_username', 'content', 'movie_name']
	list_per_page = 100


class StampAdmin(admin.ModelAdmin):
	pass


admin.site.register(Movie, MovieAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(Stamp, StampAdmin)
